<style>
    .rich-panel-body {
        font-size: 13px;
    }
</style>
<f:view>
    <h:form>
        <h:outputText value="Posting in #{sessionBean.ejbSession.currentSite.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.event==null}"/>
        <h:outputText value="Posting in #{eventBean.event.site.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.event!=null}"/>
        <h:outputText value=", #{eventBean.area.area}"  style="font-size: 20px; font-weight: bold;" rendered="#{eventBean.areaId>0}"/>
        <br/>
        <h:outputText value="#{eventBean.event.startDate}"  style="font-size: 18px; font-weight: bold;">
            <f:convertDateTime type="date" dateStyle="short"/>
        </h:outputText>
        <c:if test="${!eventBean.event.onlyOneDate}">
        <h:outputText value=" - "  style="font-size: 18px; font-weight: bold;" />
        <h:outputText value="#{eventBean.event.endDate}"  style="font-size: 18px; font-weight: bold;">
            <f:convertDateTime type="date" dateStyle="short"/>
        </h:outputText>
        </c:if>
        <h:outputText value=": #{eventBean.event.title}"  style="font-size: 18px; font-weight: bold;"/>
        <h:outputText value=" - (#{eventBean.event.location})"  style="font-size: 18px; font-weight: bold;" rendered="#{eventBean.event.location!=null && eventBean.event.location!=''}" />
        <rich:separator height="1"/>
        <h:outputText value="Reply to: "/>
        <h:outputLink value="mailto:#{eventBean.event.email}" rendered="#{eventBean.event.typeReplyTo=='real email'}">
            <h:outputText value="#{eventBean.event.email}"></h:outputText>
        </h:outputLink>
        <h:outputText value="your anonymous eez2find address will appear here" style="font-style: italic;" rendered="#{sessionBean.ejbSession.event==null && eventBean.event.typeReplyTo=='masked email'}" />
        <h:outputLink value="mailto:event-#{eventBean.event.code}@eez2find.com" rendered="#{sessionBean.ejbSession.event!=null && eventBean.event.typeReplyTo=='masked email'}">
            <h:outputText value="event-#{eventBean.event.code}@eez2find.com"></h:outputText>
        </h:outputLink>
        <h:outputText value="see below" rendered="#{eventBean.event.typeReplyTo=='any email'}" />
        <br/>
        <h:outputText value="Date: #{eventBean.toDay}"/>
        <rich:spacer height="20"/>
        <rich:panel style="width:700px; border-color:white;">
            ${eventBean.description}
        </rich:panel>
        <ul>
            <c:if test="${eventBean.event.location!=null && eventBean.event.location!=''}"><li><h:outputText value="Location: #{eventBean.event.location}" /></li></c:if>
            <c:if test="${eventBean.event.othersContact}"><li><h:outputText value="You may contact event poster about other services, products or commercial interests." /></li></c:if>
            <c:if test="${!eventBean.event.othersContact}"><li><h:outputText value="Please do not contact event poster about other services, products or commercial interests." /></li></c:if>
        </ul>
        <rich:spacer height="10"/>
        <h:outputText value="Event Code: #{eventBean.event.code}" rendered="#{sessionBean.ejbSession.event!=null}" />
    </h:form>
    <h:form>
        <h:messages globalOnly="true" style="color: red" styleClass="errorMessage"/>
        <h:panelGrid columns="2">
            <h:outputLink value="/site/faces/eventPosting/create.jsp" rendered="#{sessionBean.ejbSession.event==null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:outputLink value="/site/faces/eventPosting/edit.jsp" rendered="#{sessionBean.ejbSession.event!=null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:commandButton id="submitCreate" type="submit" value="Create" action="#{eventBean.create}" rendered="#{sessionBean.ejbSession.event==null}"/>
            <h:commandButton id="submitUpdate" type="submit" value="Update" action="#{eventBean.update}" onclick="if(!confirm('Your Post has been edited. Are you sure?'))return false" rendered="#{sessionBean.ejbSession.event!=null}" />
        </h:panelGrid>
    </h:form>
    <rich:separator height="1" />
</f:view>